/**
 * strictc - the Strict compiler
 * Copyright (C) 2008 David Olsson (vonolsson@gmail.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#if !defined(__VISITOR_H__)
#define __VISITOR_H__

class ClassNode;
class CodeBlockNode;
class FunctionNode;
class InterfaceNode;
class NamespaceNode;
class ProgramNode;
class SourceFileNode;

class Visitor {
public:
    void apply(ProgramNode &root) throw();
    
    virtual void preVisit(ProgramNode &node) throw() = 0;
    virtual void postVisit(ProgramNode &node) throw() = 0;
    virtual void preVisit(SourceFileNode &node) throw() = 0;
    virtual void postVisit(SourceFileNode &node) throw() = 0;
    virtual void preVisit(ClassNode &node) throw() = 0;
    virtual void postVisit(ClassNode &node) throw() = 0;
    virtual void preVisit(InterfaceNode &node) throw() = 0;
    virtual void postVisit(InterfaceNode &node) throw() = 0;
    virtual void preVisit(NamespaceNode &node) throw() = 0;
    virtual void postVisit(NamespaceNode &node) throw() = 0;
    virtual void preVisit(FunctionNode &node) throw() = 0;
    virtual void postVisit(FunctionNode &node) throw() = 0;
    virtual void preVisit(CodeBlockNode &node) throw() = 0;
    virtual void postVisit(CodeBlockNode &node) throw() = 0;
};

#endif
